package com.cf.docker.service.ssh; /**
 * ssh-test-SSHResInfo
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/20 下午 01:42
 */

/**
 * @author 牵手无奈
 * @version V1.0
 * @date 2016年12月1日上午11:19:47
 */
public class SSHResInfo {

    private int exitStute;//返回状态码 （在linux中可以通过 echo $? 可知每步执行令执行的状态码）

    private String result;

    public SSHResInfo(int exitStute, String result) {
        this.exitStute = exitStute;
        this.result = result;
    }

    public int getExitStute() {
        return exitStute;
    }

    public void setExitStute(int exitStute) {
        this.exitStute = exitStute;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public boolean isSuccess() {
        return this.exitStute <= 0;
    }

    @Override
    public String toString() {
        return "SSHResInfo{" +
                "exitStute=" + exitStute +
                ", result='" + result + '\'' +
                '}';
    }
}